<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link
      rel="stylesheet"
      href="https://unpkg.com/nprogress@0.2.0/nprogress.css"
    />
  </head>

  <body>
    <script src="https://unpkg.com/nprogress@0.2.0/nprogress.js"></script>
    <script>
      // 开启进度
      // nprogress二方法   开始 NProgress.start()   完成   NProgress.done()
      NProgress.start();
      setTimeout(() => {
        // 结束进度
        NProgress.done();
      }, 1000);
    </script>
  </body>
</html>
